Attribute VB_Name = "Modulo1"
Sub Macro1()
Attribute Macro1.VB_ProcData.VB_Invoke_Func = " \n14"
'
' Macro1 Macro
'

'

i = 2
Sheets("Products").Select

Do While (Trim(Cells(i, 1)) <> "")
   scat = Cells(i, 9)
   j = 2
   bTRova = False
   
   Do While (Trim(Sheets("cat").Cells(j, 1))) <> "" And (Not bTRova)
      sCat2 = Sheets("cat").Cells(j, 2)
      sIdCat = Sheets("cat").Cells(j, 1)
      

      
      If Trim(UCase(scat)) = Trim(UCase(sCat2)) Then
         Sheets("Products").Cells(i, 8) = sIdCat
         bTRova = True
      End If
      
      j = j + 1
   Loop
   
   
   
   i = i + 1


Loop


End Sub
